#!/usr/bin/env python
# -*- coding: utf-8 -*-
# --------------------------------------------------
#Author:		LJ
#Email: admin@attacker.club

with open('test','r+',encoding='utf-8') as f:
    for num in range(10):
        f.write('%d' %num)

    f.seek(1) #返回光标开头
    print('读取seek指定位置的内容',f.read())


    f.seek(1)  # 返回光标开头
    f.truncate(5)
    print('打印当前行的保留字节',f.readline())








